<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "park_space".
 *
 * @property integer $id
 * @property string $uid
 * @property string $sn
 * @property string $name
 * @property integer $loc_id
 * @property string $hw_id
 * @property integer $status
 * @property string $create_date
 * @property string $update_date
 * @property string $option
 */
class ParkSpace extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'park_space';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'sn', 'hw_id'], 'required'],
            [['loc_id', 'status'], 'integer'],
            [['create_date', 'update_date'], 'safe'],
            [['option'], 'string'],
            [['uid'], 'string', 'max' => 50],
            [['sn', 'hw_id'], 'string', 'max' => 200],
            [['name'], 'string', 'max' => 500],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'Id',
            'uid' => '唯一标识',
            'sn' => '车位编号',
            'name' => '名称',
            'loc_id' => '位置id',
            'hw_id' => '硬件id',
            'status' => '状态',
            'create_date' => '创建日期',
            'update_date' => '更新日期',
            'option' => '备用字段',
        ];
    }
}
